package cn.smart.epic.common.constant.state;

/**
 * @Auther Z.B
 * @date 2017/9/21 16:39
 * @Email 2545375@qq.com
 * @Description 业务日志类型
 * @since 1.0
 */

public enum BizLogType {

    ALL(0,null),
    BUSSINESS(1,"业务日常"),
    EXCEPTION(2,"异常业务");

    Integer val;
    String message;

    BizLogType(Integer val, String message) {
        this.val=val;
        this.message=message;
    }

    public Integer getVal() {
        return val;
    }

    public void setVal(Integer val) {
        this.val = val;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueOf(Integer value) {
        if (value == null) {
            return "";
        }else{
            for (BizLogType bt : BizLogType.values()) {
                if (bt.getVal().equals(value)) {
                    return bt.getMessage();
                }
            }
            return null;
        }
    }
}
